﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="header.ascx.cs" Inherits="header" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Collections.Generic" %>
<script type="text/javascript" src="/assets/javascript/drag.js"></script>
<script type="text/javascript" src="/assets/javascript/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="/assets/javascript/custom.js"></script>
<div id="topNav">
        <div id="topNavWrap">
            <span class="box_l welcome">
                你好，欢迎光临 <em>超敏仪器</em>
            </span>
            <span class="box_r fav">
                收藏我们
            </span>

        </div>
    </div>
    <div id="logoBar">
        <img src="/assets/images/logo.jpg" />
    </div>
    <div style="width:1000px;margin:10px auto 0px auto; background:url('/assets/images/red-top.jpg') no-repeat;position:relative;height:87px;">
        <a href="http://www.supersense.com.cn" target="_blank" style="width:400px;height:23px;display:inline-block;top:55px;left:308px;position:absolute;"></a>
    </div>
    <div >
        <ul id="nav">
	    <li <% if( channel == "default" ){ %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href='/' class="channel">首页</a></li>
            <li <% if( channel == "aboutus" ){ %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="aboutus.aspx" class="channel">关于超敏</a>
            </li>
            <li <% if (channel == "product")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/product.aspx" class="channel">产品中心<i class="arrow"></i></a>
                <ul>
                    <% foreach (TreeNode treeNode in treeView.Nodes){ %>
                        <li><a href="product.aspx?type=<%=treeNode.Value.ToString() %>"><%=treeNode.Text.ToString() %></a>
                            <%if(treeNode.ChildNodes.Count > 0){ %>
                                <ul>
                                    <% foreach( TreeNode tmpTreeNode in treeNode.ChildNodes ){ %>
                                        <%String url1 = "product.aspx?type=" + treeNode.Value.ToString() + "&amp;catid=" + tmpTreeNode.Value.ToString(); %>
                                        <%String url2 = "product_detail.aspx?id=" + tmpTreeNode.Value.ToString(); %>
                                        <li><a href="<%if (tmpTreeNode.Target.ToString() == "cat") { Response.Write(url1); } else { Response.Write(url2); } %>"><%=tmpTreeNode.Text.ToString() %></a>
                                            <% if( tmpTreeNode.ChildNodes.Count > 0 ){ %>
                                                <ul>
                                                    <%foreach(TreeNode tn in tmpTreeNode.ChildNodes){ %>
                                                    <li><a href="product_detail.aspx?id=<%=tn.Value.ToString() %>"><%=tn.Text.ToString() %></a></li>
                                                    <% } %>
                                                </ul>
                                            <%} %>
                                        </li>
                                    <% } %>
                                </ul>
                            <% } %>
                        </li>
                    <% } %>
                </ul>
            </li>
            <li <% if (channel == "solution")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/solution.aspx" class="channel">解决方案<i class="arrow"></i></a>
                <ul>
                    <% foreach (DataRow dr in solutions.Rows){ %>
                    <li><a href="solution_detail.aspx?id=<%=dr["id"] %>" target="_blank"><%=dr["subject"] %></a></li>
                    <% } %>
                </ul>
            </li>
            <li <% if (channel == "industry")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/industry.aspx" class="channel">行业应用<i class="arrow"></i></a>
                    <ul class='children'>
                        <% foreach( DataRow dr in industry.Rows ){ %>
                        <li><a href="/industry_detail.aspx?type=<%=dr["id"] %>"><%=dr["name"] %></a></li>
                        <% } %>
                    </ul>
            </li>
            <li <% if (channel == "service")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/service.aspx" class="channel">售后服务</a></li>
            <li <% if (channel == "knowledge")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/knowledge.aspx" class="channel">科普知识</a></li>
            <li <% if (channel == "contactus")
                   { %> class="current_page_item" <% }else{ %> class="page_item" <% } %>><a href="/contactus.aspx" class="channel">联系我们</a></li>
        </ul>
           
    </div>
